package demo1;

import java.util.Scanner;

public class Day0302 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int n = in.nextInt();
        int x = in.nextInt();
        int[] arr = new int[n];
        for(int i = 0; i < n; i++) {
            arr[i] = in.nextInt();
        }
        int minCount = n;
        int count = 0;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            int j = i;
            int sum = arr[j];
            while(j < n - 1) {
                if(sum >= x) {
                    break;
                }else {
                    j++;
                    sum += arr[j];
                    count++;
                    if(count > minCount) {
                        break;
                    }
                }
            }
            if(sum >= x && minCount > count) {
                tmp = i;
                minCount = count;
            }
            count = 0;
        }
        System.out.println((tmp + 1) + " " + (tmp + minCount + 1));
    }
}
